import request from '@/utils/request'

/**
 * 获取类目集合
 * @param query
 */
export function listArea(query) {
  return request({
    url: '/area/listArea',
    method: 'get',
    params: query
  })
}

/**
 * 获取省列表
 * @param query
 */
export function listProvince() {
  return request({
    url: '/area/listProvince',
    method: 'get'
  })
}

/**
 * 获取市列表
 * @param query
 */
export function listCity(provinceCode) {
  return request({
    url: '/area/listCity',
    method: 'get',
    params: { provinceCode: provinceCode }
  })
}
/**
 * 获取市列表
 * @param query
 */
export function listDistrict(cityCode) {
  return request({
    url: '/area/listDistrict',
    method: 'get',
    params: { cityCode: cityCode }
  })
}
